<?php
	require_once('../webroot/js/clsMsDocGenerator.php');	
		
	$doc = new clsMsDocGenerator();
	
	$doc->setFontFamily('Arial');
	$doc->setFontSize('11');

	$doc->addParagraph('REPORTE PRUEBAS', array('text-align' => 'center','font-weight' => 'bold'));
	$doc->addParagraph('CORPORACI&Oacute;N INFANCIA Y DESARROLLO',array('font-weight' => 'bold'));	
    $doc->addParagraph('TUTOR: '.$tutor_activo,array('font-weight' => 'bold'));	
	$doc->addParagraph('CIRCULO APRENDIZAJE: '.$circulo_activo,array('font-weight' => 'bold'));
	foreach ($estudiantes as $estudiante){
	$doc->addParagraph('ESTUDIANTE: '.$estudiante['Estudiante']['nombre_completo'],array('font-weight' => 'bold'));	
	$doc->addParagraph('GRADO: '.$grado_estudiante,array('font-weight' => 'bold'));
	}
	    
	    $doc->addParagraph('');
	    $doc->addParagraph('PRUEBAS DE ADSCRIPCION',array('font-weight' => 'bold'));
	    $doc->addParagraph(''); 

	    //Tabla
	    $doc->startTable(NULL, 'tableWithoutGrid');
		$header = array('Area', 'Criterio', 'Puntaje');
		$aligns = array('center', 'center', 'center');
		$valigns = array('middle', 'middle', 'middle');
		$doc->addTableRow($header, $aligns, $valigns, array('font-weight' => 'normal', 'font-size' => '11pt', 
														'background-color' => '#9F9F9F', 'color'=>'white'));
        
		foreach ($resultados as $resultado){ 	    	
	    
	    	    $cols = array();	    	
	    	    $cols[]=$resultado['Criterio']['area'];	
				$cols[]=$resultado['Criterio']['indicador'];	
				$cols[]=$resultado['Criterio']['nivel'];				
				$doc->addTableRow($cols, NULL, NULL, array('font-size' => '10pt'));	
		}
		
	    $doc->endTable();	    
	    
	  $doc->addParagraph('');
	    $doc->addParagraph('PRUEBAS FINALES',array('font-weight' => 'bold'));
	    $doc->addParagraph(''); 

	    //Tabla
	    $doc->startTable(NULL, 'tableWithoutGrid');
		$header = array('Area', 'Criterio', 'Puntaje');
		$aligns = array('center', 'center', 'center');
		$valigns = array('middle', 'middle', 'middle');
		$doc->addTableRow($header, $aligns, $valigns, array('font-weight' => 'normal', 'font-size' => '11pt', 
														'background-color' => '#9F9F9F', 'color'=>'white'));
	    foreach ($resultados_finales as $resultado_final){ 	    	
	    
	    	    $cols = array();	    	
	    	    $cols[]=$resultado_final['Criterio']['area'];	
				$cols[]=$resultado_final['Criterio']['indicador'];	
				$cols[]=$resultado_final['Criterio']['nivel'];				
				$doc->addTableRow($cols, NULL, NULL, array('font-size' => '10pt'));	
		}
	    $doc->endTable();	 
	    
	$doc->addParagraph('');
	$doc->output('Reporte Estudiantil('.$estudiante['Estudiante']['nombre_completo'].')');
?>